package com.starlink.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.starlink.model.domain.StreetDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author zhanghong
 */
@Repository
public interface StreetMapper extends BaseMapper<StreetDO> {
    StreetDO selectDOByCode(String code);
    List<StreetDO> selectDOList(StreetDO street);
    int insertDO(StreetDO street);
    int batchInsertDO(List<StreetDO> streetDOList);
    int updateDO(StreetDO street);
    int deleteDOByCode(String code);
    int deleteDOByCodes(String[] codes);

    List<Map<String, String>> queryAllProvince();

    List<Map<String, String>> queryCityByCode(@Param("code") String code);

    List<Map<String, String>> queryAreaByCode(@Param("code")String code);

    List<Map<String, String>> queryAllCityList();

    List<Map<String, String>> queryAllAreaList();
}
